package com.atguigu.common.constant;

/**
 * 商品属性的常量类
 *
 * @Author ShiJieLin
 * @Date 2022/4/6 12:15
 * @Version 1.0
 */
public class ProductConstant {

    /**
     * 分类下属性的常量类
     */
    public enum AttrEnum {
        ATTR_TYPE_BASE(1, "基本属性"), ATTR_TYPE_SALE(0, "销售属性"),
        ;
        private int code;
        private String msg;

        AttrEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }

    /**
     * 分类常量类
     */
    public enum CategoryEnum {

        CATEGORY_ID(0L, "查询所有分类")
        ;
        private Long code;
        private String msg;

        CategoryEnum(Long code, String msg) {
            this.code = code;
            this.msg = msg;
        }
        public Long getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }


    public enum ProductStatusEnum {

        NEW_SPU(0L,"新建"),
        SPU_UP(1L,"商品上架"),
        SPU_DOWN(2L,"商品下架"),
        ;
        private Long code;
        private String msg;

        ProductStatusEnum(Long code, String msg) {
            this.code = code;
            this.msg = msg;
        }
        public Long getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }
}
